package com.bm.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName ejyy_user_car
 */
@TableName(value ="ejyy_user_car")
@Data
public class EjyyUserCar implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 
     */
    private Long wechatMpUserId;

    /**
     * 
     */
    private Long buildingId;

    /**
     * 
     */
    private String carNumber;

    /**
     * 1 蓝牌；2黄牌
     */
    private Boolean carType;

    /**
     * 
     */
    private Byte isNewEnergy;

    /**
     * 1 正常 0 删除
     */
    private Boolean status;

    /**
     * 
     */
    private Boolean sync;

    /**
     * 
     */
    private Long createdAt;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        EjyyUserCar other = (EjyyUserCar) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getWechatMpUserId() == null ? other.getWechatMpUserId() == null : this.getWechatMpUserId().equals(other.getWechatMpUserId()))
            && (this.getBuildingId() == null ? other.getBuildingId() == null : this.getBuildingId().equals(other.getBuildingId()))
            && (this.getCarNumber() == null ? other.getCarNumber() == null : this.getCarNumber().equals(other.getCarNumber()))
            && (this.getCarType() == null ? other.getCarType() == null : this.getCarType().equals(other.getCarType()))
            && (this.getIsNewEnergy() == null ? other.getIsNewEnergy() == null : this.getIsNewEnergy().equals(other.getIsNewEnergy()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getSync() == null ? other.getSync() == null : this.getSync().equals(other.getSync()))
            && (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getWechatMpUserId() == null) ? 0 : getWechatMpUserId().hashCode());
        result = prime * result + ((getBuildingId() == null) ? 0 : getBuildingId().hashCode());
        result = prime * result + ((getCarNumber() == null) ? 0 : getCarNumber().hashCode());
        result = prime * result + ((getCarType() == null) ? 0 : getCarType().hashCode());
        result = prime * result + ((getIsNewEnergy() == null) ? 0 : getIsNewEnergy().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getSync() == null) ? 0 : getSync().hashCode());
        result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", wechatMpUserId=").append(wechatMpUserId);
        sb.append(", buildingId=").append(buildingId);
        sb.append(", carNumber=").append(carNumber);
        sb.append(", carType=").append(carType);
        sb.append(", isNewEnergy=").append(isNewEnergy);
        sb.append(", status=").append(status);
        sb.append(", sync=").append(sync);
        sb.append(", createdAt=").append(createdAt);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}